package com.woniu.micropropertyserver.service;


import com.github.pagehelper.PageInfo;
import com.woniu.microcommonsserver.entity.OwnerInfoEntity;
import com.woniu.micropropertyserver.util.PageRest;

import java.util.List;

public interface IOwnerInfoService {

    List<OwnerInfoEntity> findall();
    OwnerInfoEntity findById(Long id);
    int updateInfo(OwnerInfoEntity ownerInfo);
    int delInfo(Long id);
    Long saveInfo(OwnerInfoEntity ownerInfo);
    PageInfo<OwnerInfoEntity> findAllByParams(PageRest pageRest,OwnerInfoEntity ownerInfo);
    OwnerInfoEntity findByCard(String id);

    OwnerInfoEntity findByNameAndHouse(String name,String houseNum);

    /**
     * 根据 房间id，查询它的业主
     * @param sid 房间id
     * @return
     */
    OwnerInfoEntity findOwerBySid(Long sid);

    /**
     * 根据 房间id，查询它的业主id
     * @param sid
     * @return
     */
    Long findOwerIdBySid(Long sid);

    /**
     * 根据 业主id，查询业主名字
     * @param id
     * @return
     */
    String findOwerNameById(Long id);

    List<OwnerInfoEntity> findByName(String name);

    OwnerInfoEntity findHouseById(Long id);
}

